# -*- coding: utf-8 -*-
# @description: 
# @File  : demo3.py
# @Time  :2022-09-17 22:06:28
# @Author:selfeasy
# @Email :selfeasy@qq.com
import base64
from cryptography.hazmat.primitives import hashes,serialization
from cryptography.hazmat.primitives.asymmetric import padding,rsa
from cryptography.hazmat.backends import default_backend
print(default_backend())

private_key =serialization.load_pem_private_key(
    open('./data/t.pem','rb').read(),password=None
    )
token = "gBp3qrkeWrOH0iDxP+p0ZTC4Qv31kvnhpK/s7vrRihmO7Fy46POAMKvNJblHIrX+kfB9Laxiv9O/iDP0aNJe6UYpc8k32WFeoTSgho2VeA0kYRAVO4Q+KXReBuk9VkB64IPiCy7jArD5XuantlJOkpOEpQGtYYphMh7d5N0cBQM=";
token = base64.b64decode(token)
original_data = private_key.decrypt(
    token,
    padding.OAEP(
        mgf=padding.MGF1(algorithm=hashes.SHA256()),
        algorithm=hashes.SHA256(),
        label=None
    )
)
